package com.yanqu.road.entity.activity.pawnshop;

import com.yanqu.road.entity.config.system.NormalWeightItem;

import java.util.ArrayList;
import java.util.List;

public class ConfPawnshopEvent {
    private int activityId;
    private int eventId;
    private String addition;
    private int during;
    private int weight;
    private List<NormalWeightItem> weightItemList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        this.eventId = eventId;
    }

    public String getAddition() {
        return addition;
    }

    public void setAddition(String addition) {
        this.addition = addition;
        setWeightItemList(addition);
    }

    public int getDuring() {
        return during;
    }

    public void setDuring(int during) {
        this.during = during;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public void setWeightItemList(String addition) {
        List<NormalWeightItem> dataList = NormalWeightItem.parseWeightItemList(addition);
        setWeightItemList(dataList);
    }

    public List<NormalWeightItem> getWeightItemList() {
        return weightItemList;
    }

    private void setWeightItemList(List<NormalWeightItem> weightItemList) {
        this.weightItemList = weightItemList;
    }
}
